package com.fqgj.sentry.policy.engine.exception;

import com.fqgj.common.api.enums.ErrorCodeEnum;
import org.springframework.http.HttpStatus;

public enum ParserExceptionEnum implements ErrorCodeEnum {

    //字段
    variable_not_found(3001, "变量未找到", HttpStatus.NOT_FOUND),
    get_decision_priority_error(3002, "决策优先级取不到", HttpStatus.NOT_FOUND),
    compute_score_error(3003, "计算评分出错", HttpStatus.NOT_FOUND),
    compute_weight_score_error(3004, "计算权重分出错", HttpStatus.NOT_FOUND),
    compute_weight_result_error(3005, "计算权重结果出错", HttpStatus.NOT_FOUND),
    groovy_compute_error(3006, "groovy运算出错", HttpStatus.NOT_FOUND),;

    private Integer code;
    private String msg;
    private HttpStatus httpStatus;


    ParserExceptionEnum(Integer code, String msg, HttpStatus httpStatus) {
        this.code = code;
        this.msg = msg;
        this.httpStatus = httpStatus;
    }

    public ParserExceptionEnum setCode(Integer code) {
        this.code = code;
        return this;
    }

    public ParserExceptionEnum setMsg(String msg) {
        this.msg = msg;
        return this;
    }

    public ParserExceptionEnum setHttpStatus(HttpStatus httpStatus) {
        this.httpStatus = httpStatus;
        return this;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public HttpStatus getHttpStatus() {
        return httpStatus;
    }
}
